import SMERouter from "sme-router";
import axios from 'axios'



//引入路由函数
import loginRoute from "$r/login";
import advRoute from "$r/adv";
import adminListRoute from "$r/adminList";
import advListRoute from "$r/advList";

//实例化路由器对象,并且传入一级路由的作用区域(是一个id)
//默认是hash路由模式 访问如下:http://XX.xX.XX.xx:XXXX/#/login
const router = new SMERouter("app", 'html5')

window.router = router

//配置路由
router.route("/login", loginRoute)

//配置adv  及其 二级路由
router.route("/adv", advRoute)

router.route('/adv/adminList', adminListRoute)

router.route('/adv/advList', advListRoute)